]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Reset the OSK to the primary monitor when monitors change
authorRui Matos <tiagomatos@gmail.com>
Mon, 13 Oct 2014 15:43:39 +0000 (17:43 +0200)
committerRui Matos <tiagomatos@gmail.com>
Thu, 16 Oct 2014 14:42:36 +0000 (16:42 +0200)
When monitors change, the previous index might not mean the same
physical monitor anymore, in fact, it might become invalid. In the
latter case, we'll actually get a JS error when accessing
this.keyboardMonitor in _updateKeyboardBox() . To avoid this, let's
just always reset the OSK to the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=738536

js/ui/layout.js

index c61376dd6f923c5e57c6e95942e91d623f87c76e..dda9fc7d6d3825616973b5093146c21524a76057 100644 (file)
@@ -423,10 +423,7 @@ const LayoutManager = new Lang.Class({
         this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
         this.panelBox.set_size(this.primaryMonitor.width, -1);
 
-        if (this.keyboardIndex < 0)
-            this.keyboardIndex = this.primaryIndex;
-        else
-            this._updateKeyboardBox();
+        this.keyboardIndex = this.primaryIndex;
 
         this.trayBox.set_position(this.bottomMonitor.x,
                                   this.bottomMonitor.y + this.bottomMonitor.height);